package com.easy.life.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.easy.life.common.R;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.easy.life.dao.ImageDao;
import com.easy.life.entity.ImageEntity;
import com.easy.life.service.ImageService;

import javax.annotation.Resource;
import java.util.List;


@Service
public class ImageServiceImpl extends ServiceImpl<ImageDao, ImageEntity> implements ImageService {

    @Resource
    private ImageDao imageDao;

    @Override
    public R getRoomImage(Long id) {
        List<ImageEntity> images = imageDao.selectList(new QueryWrapper<ImageEntity>().eq("roomId", id));
        return R.ok().put("data",images);
    }
}